-- raptor_form
-- created by shuzy
-- 变身猛禽形态属性

return {
    fetchProps = function(who, status, condition)
        local props    = {};
        local propId   = PropM.getPropId("shape_change");
        local endRound = condition["end_round"];

        -- 变身
        local shapeId = condition["shape_id"]
        if shapeId then
            table.insert(props, {propId, shapeId, 1, endRound});
        end

        -- 魔力提升
        propId = PropM.getPropId("attrib2");
        local value  = tonumber(condition["value"]);
        if value > 0 then
            table.insert(props, { propId, "magic", value, endRound, });
        end

        -- 学会两个主动技
        propId = PropM.getPropId("gain_slime_skill");
        local level = condition["level"] or 1;
        table.insert(props, { propId, 31, level, endRound, });
        table.insert(props, { propId, 32, level, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 魔力提升
        local value = condition["value"];
        desc = string.gsub(desc, "{value}", value);

        return desc;
    end,
};
